<template>
  <div class="dialog-detail">
    <el-dialog
      title="提示"
      :visible.sync="dialogVisible"
      width="50%"
      :before-close="handleClose"
    >
      <span>这是一段信息</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="doBrandSave">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  components: {

  },
  data() {
    return {
      dialogVisible: false // 用于控制弹窗是否打开
    }
  },
  computed: {

  },
  created() {

  },
  mounted() {

  },
  methods: {
    // 弹窗关闭的时候触发
    handleClose() {
      this.dialogVisible = false
      console.log('关闭...')
    },
    // 执行保存
    doBrandSave() {
      this.dialogVisible = false
      // 关闭之后需要刷新列表
      // 2. 如果成功之后,需要刷新父列表
      this.$emit('refrush')
    },
    // 打开弹窗
    openDialog() {
      this.dialogVisible = true
    }
  }
}
</script>

<style scoped lang="scss">
    .dialog-detail{

    }
</style>
